package com.demo.seckill.common.config;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author libo
 * @ClassName IndexController
 * @date 2018/11/15 18:23
 */
@RestController
public class IndexController {
    /**
     * 页面跳转
     * @param module
     * @param url
     * @return
     */
    @RequestMapping("{url}.shtml")
    public String page(@PathVariable("url") String url) {
        return  url;
    }
    /**
     * 页面跳转(二级目录)
     * @param module
     * @param function
     * @param url
     * @return
     */
    @RequestMapping("{module}/{url}.shtml")
    public String page(@PathVariable("module") String module,@PathVariable("url") String url) {
        return module + "/" + url;
    }
}
